package com.touch.jgloo.core;
import javax.media.opengl.GL;
/**
 * The base of all JGLOO/OWT objects. It contains the Constants and
 * adds the GL object instance.
 * @author Homicidal Monkey
 * @version 10.1.9
 * @since r419
 * @see com/touch/Licence
 */
public class JGLBase extends JGLConstants
{
	/**
	 * The instance of the GL Object. 
	 * @since r461
	 */
	public static GL			GL_INSTANCE;
	/**
	 * Sets the GLInstance. This only needs to be done once and will only work once.
	 * @param gl GL Object.
	 * @since r461
	 */
	public void setGLInstance(final GL gl)
	{
		if(GL_INSTANCE == null)
			GL_INSTANCE = gl;
	}
	/**
	 * Overrides the "String toString" to describe the JGLBase.
	 * @return String describing the JGLBase
	 * @since r461 
	 */
	public String toString()
	{
		return "JGLBase: " + GL_INSTANCE;
	}
}
